// 获取基础URL方式
var baseUrl = window.location.protocol + '//' + window.location.host;

// 需要加载的资源列表
var resources = [
    { type: 'script', path: '/public/js/main.js' },
    { type: 'script', path: '/public/lib/wsx/land.js' },
    { type: 'script', path: '/public/js/app.js' },
    { type: 'stylesheet', path: '/public/css/reset.min.css' },
    { type: 'stylesheet', path: '/public/css/common.min.css' },
    { type: 'stylesheet', path: '/public/css/font.css' },
    { type: 'stylesheet', path: '/public/css/theme.css' }
];

// 批量生成资源标签
for (var i = 0; i < resources.length; i++) {
    var resource = resources[i];
    var tag = '';
    
    if (resource.type === 'script') {
        tag = '<script type="text/javascript" src="' + baseUrl + resource.path + '"></script>';
    } else {
        tag = '<link rel="stylesheet" href="' + baseUrl + resource.path + '" />';
    }
    
    document.writeln(tag);
}